<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>手动代扣</title>
    <style type="text/css">
    </style>
    <jsp:include page="../../import.jsp" flush="true"/>
    <script type="text/javascript">
        $(function () {
            $("#manualdetai_form").ligerForm();
        });
        //下载模板
        function downTemp(){
            window.location.href="<%=path%>/resource/template/infside/YCCollectTemp.xls";
        }
        //批量导入
        function addBatch(){
            //获取上传文件地址
            var files=getUploadResultParams();
            if(files&&files.length>0){
                var filePath=files[0].filePath;
                var fileExtension = filePath.substring(filePath.lastIndexOf('.') + 1);
                if(fileExtension!='xls'&&fileExtension!='XLS'){
                    $.ligerDialog.SQalert({content: "请上传.xls后缀的文件", SQ_type: "warn"});
                    return;
                }
                var wait_dialog;
                $.ajax({
                    type: 'post',
                    dataType:'json',
                    data:"filePath="+filePath,
                    url: '<%=path%>/infside/infPostCollectDetail/manualDetaiXls.do',
                    beforeSend: function(){
                        wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
                    },
                    success:function(msg){
                        wait_dialog.close();
                        if(msg.success == 1){
                            $.ligerDialog.SQalert({content:msg.info, SQ_type: "success"});
                        }else{
                            $.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
                        }
                    }
                });
            }else{
                $.ligerDialog.SQalert({content: "请先上传文件", SQ_type: "warn"});
            }
        }
    </script>
</head>

<body class="iframeBody">
<form id="manualdetai_form">
    <div class="fieldset1 tabel_col tabel_col_1 clearFix">
        <div class="fieldBox col_100">
            <div class="label">导入代扣文件:</div>
            <div class="field">
                <jsp:include page="../../system/sysUlFilesRec/sysSysUlFilesRecUpload.jsp" flush="true" >
                    <jsp:param name="fileNum" value="1"/>
                    <jsp:param name="filePath" value="infside/manualdeta"/>
                </jsp:include>
                <span id="addBatchBtn" class="sq-button sq-button-hasicon" onclick="addBatch();"><i class="sqBtnIco_33"></i>代扣导入</span>
                <span id="downTempBtn" class="sq-button sq-button-hasicon" onclick="downTemp();"><i class="sqBtnIco_8"></i>下载模板</span>
            </div>
        </div>
    </div>
</form>
<span>
            代扣文件生成规则：
			<br>
            1.按照时间段选择代扣日期（支付表应付日期，罚息取当天）
			<br>
			2.上午11点下午4点为邮储处理文件时间，如果要发送2次文件，需要第一次在11点前，第二次在4点前
			<br>
			3.验证代扣生成文件总数不能超过10，超过下午4点当天不能再生成文件
            <br>
			4.代扣文件根据批次号生成，文件个数跟批次号一致，明细选取代扣卡允许代扣的用户
			<br>
			代扣文件操作按钮：明细：查看文件代扣记录；发送：发送文件；删除：删除文件重新生成；获取回传：从邮储获取文件；
</span>
</body>
</html>
